import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import store from './store'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import Element3 from 'element3'
import 'element3/lib/theme-chalk/index.css'

window.onerror = (err: any) => {
    console.log(typeof err)
}
const app = createApp(App)
// 全局注册自定义聚焦指令
app.directive('focus', {
    mounted: (el) => {
        console.log('我是全局v-focus指令，声明周期mounted， el=', el)
        el.focus()
    }
})
app.use(Antd)
app.use(Element3)
app.use(store)
app.use(router).mount('#app')
